/*
 * @Author: wangjianwhy wangjianwhy@sina.com
 * @Date: 2024-09-24 15:10:04
 * @LastEditors: wangjianwhy wangjianwhy@sina.com
 * @LastEditTime: 2024-10-25 16:40:11
 * @FilePath: \my-vue3-appg:\vscode-work\tlo-shopping\src\router\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
// router/index.js
import { createRouter, createWebHashHistory } from 'vue-router'
import AppLogin from '@/views/AppLogin.vue';
import IndexHome from '@/views/home/IndexHome.vue';
import IndexScene from '@/views/scene/IndexScene.vue';
import IndexMall from '@/views/mall/IndexMall.vue';
import IndexProject from '@/views/project/IndexProject.vue';
import IndexMyCenter from '@/views/myCenter/IndexMyCenter.vue';
import ShoppingActivity from '@/views/mall/ShoppingActivity.vue';
import ProductDetail from '@/views/mall/ProductDetail.vue';
import ProductType from '@/components/product/ProductType.vue';
import QueryShopList from '@/components/product/QueryShopList.vue';
import SearchShopping from '@/views/mall/SearchShopping.vue';
import ShoppingCar from '@/components/product/ShoppingCar.vue';
import ShopBalance from '@/views/mall/ShopBalance.vue';
import ServiceChat from '@/views/mall/ServiceChat.vue';
import SignIn from '@/views/mall/my/SignIn.vue';


const routes = [
    {
        path: '/login',
        name: 'login',
        meta: {title: '登录', noCache: true},
        component: AppLogin
    },
    {
        path: '/',
        name: 'index',
        redirect: '/home',
        meta: {title: '智家', noCache: true},
        component: IndexHome
    },{
        path: '/home',
        name: 'home',
        meta: {title: '智家', noCache: true},
        component: IndexHome
    },{
        path: '/scene',
        name: 'scene',
        meta: {title: '场景', noCache: true},
        component: IndexScene
    },{
        path: '/mall',
        name: 'mall',
        meta: {title: '商城', noCache: true},
        component: IndexMall
    },{
        path: '/project',
        name: 'project',
        meta: {title: '工程', noCache: true},
        component: IndexProject
    },{
        path: '/myCenter',
        name: 'myCenter',
        meta: {title: '我的', noCache: true},
        component: IndexMyCenter
    },{
        name: 'shoppingActivity',
        path: '/mall/shoppingActivity/:moduleId?/:moduleName?',
        component: ShoppingActivity,
        meta: { title: '商品活动', hideFooter: true }
    },{
        name: 'productDetail',
        path: '/mall/productDetail/:id?',
        component: ProductDetail,
        meta: { title: '商品详情', hideFooter: true }
    },{
        name: 'menuType',
        path: '/product/menuType',
        component: ProductType,
        meta: { title: '商品分类', hideFooter: true }
    },{
        name: 'queryShopList',
        path: '/product/queryShopList',
        component: QueryShopList,
        meta: { title: '查询商品列表', hideFooter: true }
    },{
        name: 'signIn',
        path: '/my/signIn',
        component: SignIn,
        meta: { title: '签到', hideFooter: true }
    },{
        name: 'searchShopping',
        path: '/product/searchShopping',
        component: SearchShopping,
        meta: { title: '搜索', hideFooter: true }
    },{
        name: 'shoppingCar',
        path: '/product/shoppingCar',
        component: ShoppingCar,
        meta: { title: '购物车', hideFooter: true }
    },{
        name: 'balance',
        path: '/product/shopBalance',
        component: ShopBalance,
        meta: { title: '结算单', hideFooter: true }
    },{
        name: 'serviceChat',
        path: '/product/ServiceChat',
        component: ServiceChat,
        meta: { title: '在线客服', hideFooter: true }
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router
